SAMPLE JSON :
{
"creates": {
"Plug 1 ": { //action key
"operation": {-
// Configuration for the operation performed by the plug
// Define the input fields (steps) for the service - available options (Dynamic, Text input)
"inputFields": [{
"key": “inputField_unique_name”, // Variable to store the selected campaign
"label": "", // Label displayed to the user
"type": "dropdown", // Field type (dropdown, string, Input Groups,radio)
"help": "", // Help text for the field
"source": "Code to fetch campaign options in JS“ // Code to retrieve and populate the dropdown options - return in array of objects **THIS SHOULD HAVE A return**
},
{
"key": "Create_Prospect", // Variable to store prospect details
"type": "input groups", // Field type (dropdown, string, Input Groups),
"label": "Create Prospect", // Label displayed for the input group
"required": false // Indicates if the input group is required (true, false),
"children": [{
"key": "email", // Variable to store prospect email
"label": "Email", // Label for the email input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's email address" // Help text for the field
},
{
"key": "first_name", // Variable to store prospect first name
"label": "First Name", // Label for the first name input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's first name" // Help text for the field
},
{
"key": "last_name", // Variable to store prospect last name
"label": "Last Name", // Label for the last name input field
"type": "string", // Field type
"required": false, // Indicates if the field is required (true, false)
"help": "Enter the prospect's last name" // Help text for the field
},
{
"key": "company", // Variable to store prospect company
"label": "Company", // Label for the company input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's company name" // Help text for the field
}
]
}
],
// Perform action to execute after saving or during a dry run
"perform": {
"source": "Code to perform the action" // Code to perform the desired action, such as adding the prospect to the campaign. Final code, which will run every time at invocation.
}
}
}
}
}
TYPES in plugin
Dropdown contains:
static value will be like :-
"children": [{
"label": "Email", // Label for the email input field
"sample": "sample@socket.com", // sample value show for display only
"value": "info@socket.com", // value which will we store
},
{
"label": "Email", // Label for the email input field
"sample": "sample@socket.com", // sample value show for display only
"value": "info@socket.com", // value which will we store
},
{
"label": "Email", // Label for the email input field
"sample": "sample@socket.com", // sample value show for display only
"value": "info@socket.com", // value which will we store
},
{
"label": "Email", // Label for the email input field
"sample": "sample@socket.com", // sample value show for display only
"value": "info@socket.com", // value which will we store
},
]
Dynamic value will we like :-
"source": "Code to fetch campaign options in JS“ // Code to retrieve and populate the dropdown options - return in array of objects
**THIS SHOULD HAVE A return**
InputGroup contains:
static value will be like :-
"children": [{
"key": "email", // Variable to store prospect email
"label": "Email", // Label for the email input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's email address" // Help text for the field
},
{
"key": "first_name", // Variable to store prospect first name
"label": "First Name", // Label for the first name input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's first name" // Help text for the field
},
{
"key": "last_name", // Variable to store prospect last name
"label": "Last Name", // Label for the last name input field
"type": "string", // Field type
"required": false, // Indicates if the field is required (true, false)
"help": "Enter the prospect's last name" // Help text for the field
},
{
"key": "company", // Variable to store prospect company
"label": "Company", // Label for the company input field
"type": "string", // Field type
"required": true, // Indicates if the field is required (true, false)
"help": "Enter the prospect's company name" // Help text for the field
}
]
Dynamic value will we like :-
"source": "Code to fetch campaign options in JS“ // Code to retrieve and populate the dropdown options - return in array of objects
**THIS SHOULD HAVE A return**